// Chart.h: interface for the CChart class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CHART_H__254ACDC2_8527_476F_A912_5CA83D6BCA74__INCLUDED_)
#define AFX_CHART_H__254ACDC2_8527_476F_A912_5CA83D6BCA74__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class chItem
{
public:
	UINT level;
	UINT size;
	PVOID pContent;
};

class chLevel
{
public:
	CArray<chItem*, chItem*> arrItem;
	UINT total;
	UINT used;
	UINT level;
};

class CChart
{
public:
	CChart();
	virtual ~CChart();

public:
	void addlevel(UINT);
	void addlevel(chLevel&);
	chLevel* getlevel(UINT);
	void removelevel(UINT);
	void cleanlevels();

	//add item to level
	void additem(UINT, UINT);
	//
	void removeitem(UINT, UINT);
	//
	chItem* getitem(UINT, UINT);
	void cleanitems(chLevel*);

	const UINT& GetLev();
	void CountLevelSize();

protected:
	UINT m_nlevel;
	CArray<chLevel*, chLevel*> m_arrLevel;
};

#endif // !defined(AFX_CHART_H__254ACDC2_8527_476F_A912_5CA83D6BCA74__INCLUDED_)
